<template>
	<view>
		<u-gap height="80"></u-gap>
		<view class="fixed-bottom">
			<view class="" style="width: 426upx;margin: 0 auto;"  v-if="!remove">
				<u-button type="primary" size="large" text="SUBMIT" @click="bindSubmit"></u-button>
			</view>
			<view class="wrapper flex justify-between" v-if="remove">
				<view style="width: 320upx;">
					<u-button type="default" size="large" text="REMOVE" @click="bindRemove"
						:customStyle="removeBtnCustomStyle"></u-button>
				</view>
				<view style="width: 320upx;">
					<u-button type="primary" size="large" text="SUBMIT" @click="bindSubmit"></u-button>
				</view>
			</view>
			<view class="blank20"></view>
		</view>
	</view>
</template>

<script>
import { methods } from '../uni_modules/uview-ui/libs/mixin/mixin';
	export default {
		name:"fixed-bottom-btn",
		props: {
			remove:{
				type:Boolean,
				default:false
			},
		},
		data() {
			return {
				removeBtnCustomStyle: {
					backgroundColor: '#CDDDFE',
					color: '#ffffff'
				}
				
			};
		},
		methods:{
			bindSubmit(){
				this.$emit('submit')
			},
			bindRemove(){
				this.$store.dispatch('modal', '确认删除？').then(() => {
					this.$emit('remove')
				}).catch(() => {
				
				})
			}
		}
	}
</script>

<style>
	
	

</style>